#!/bin/sh
echo "cp tomcat"
cp -R /tmp/xyt/tomcat1 /usr/local/
cp -R /tmp/xyt/tomcat2 /usr/local/
echo "mkdir tomcat"
mkdir /data/wwwroot/tomcat1
mkdir /data/wwwroot/tomcat2
echo "cp sniffer.war"
cp /tmp/xyt/sniffer.war /data/wwwroot/tomcat1
cp /tmp/xyt/sniffer.war /data/wwwroot/tomcat2
echo "chown"
chown -R www:www /data/wwwroot
chown -R www:www /usr/local/tomcat1
chown -R www:www /usr/local/tomcat2
echo "cp nginx conf"
cp /tmp/xyt/nginx.conf /usr/local/nginx/conf
cp /tmp/xyt/proxy.conf /usr/local/nginx/conf
echo "stop tomcat"
/usr/local/tomcat/bin/shutdown.sh
echo "chmod tomcatautorestart"
chmod -R 777 /usr/local/tomcat1/bin
chmod -R 777 /usr/local/tomcat2/bin
chmod 777 /tmp/xyt/tomcatautorestart1.sh
chmod 777 /tmp/xyt/tomcatautorestart2.sh
echo "restart tomcat"
/tmp/xyt/tomcatautorestart1.sh
/tmp/xyt/tomcatautorestart2.sh
cat /tmp/TomcatMonitor.log
echo "done"